Merged
Conversation
Test Coverage Report
|
choiseoji
approved these changes
Aug 1, 2025
Comment on lines
+41
to
+58
| @Mapping(target = "startDateTime", expression = "java(java.time.LocalDateTime.of(event.getDate(), event.getStartTime()))") | ||
| @Mapping(target = "endDateTime", expression = "java(java.time.LocalDateTime.of(event.getDate(), event.getEndTime()))") | ||
| @Mapping(target = "startLocation", source = "event.place") | ||
| @Mapping(target = "runningLeaderId", source = "event.member.id") | ||
| @Mapping(target = "distanceKm", source = "event.distanceKm") | ||
| @Mapping(target = "runningTime", source = "event.runningTime") | ||
| EventDetailResponse toEventDetailResponse(Event event, EventStatus status, List<ParticipantDto> participants); | ||
|
|
||
| @Mapping(target = "id", source = "member.id") | ||
| @Mapping(target = "name", source = "member.nickname") | ||
| @Mapping(target = "image", source = "member.profileImage") | ||
| ParticipantDto toParticipantDto(JoinEvent joinEvent); | ||
|
|
||
| default List<ParticipantDto> toParticipantDtoList(List<JoinEvent> joinEvents) { | ||
| return joinEvents.stream() | ||
| .map(this::toParticipantDto) | ||
| .toList(); | ||
| } |
Contributor
There was a problem hiding this comment.
근데 이거 어떤거 Mapping으로 하고, 어떤건 default로 한 기준이 궁금합니다!
저는 모든 필드에 Mapping 다 할거면 그냥 default로 빌더 써서 했고, responseDto 만드는 거에 대해서만 map-struct 사용했는데 동현님은 어떤 기준으로 한건지 궁금합니다..
| JoinEvent joinEvent = joinEventRepository.findByEventAndMember(event, member) | ||
| .orElseThrow(JoinEventNotFound::new); | ||
|
|
||
| joinEvent.softDelete(); |
Contributor
There was a problem hiding this comment.
이거 sortDelete() 직접 구현해도 좋고
JoinEvent Entity 상단에
@SQLDelete(sql = "UPDATE JoinEvent SET deleted_at = NOW() where join_event_id = ?")
이런 식으로 해서 자동으로 적용 되도록 해도 좋아요!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ 연관된 이슈
📝 작업 내용 (주요 변경 사항)
💬 리뷰 요구사항